package com.wangp.mywrite.coding;

import java.util.Arrays;
import java.util.HashSet;

/**
 * @description: TODO
 * @author tooStronger
 * @date 2023/2/24
 */
public class MinimumOperations {

    public int minimumOperations(int[] nums) {
        HashSet<Integer> set = new HashSet<>();
        int count = 0;
        for(int i = 0;i<nums.length;i++){
            if(nums[i]!=0 && !set.contains(nums[i])){
                count++;
                set.add(nums[i]);
            }
        }
        return count;
    }

}
